package com.leo.employ.mapper

import com.leo.employ.pojo.User
import org.apache.ibatis.annotations.Insert
import org.apache.ibatis.annotations.Mapper
import org.apache.ibatis.annotations.Param
import org.apache.ibatis.annotations.Select
import java.math.BigInteger

@Mapper
interface UserMapper : BaseMapper<User> {

    @Insert("insert into user (phone, passwd, create_time) values (#{user.phone}, #{user.passwd}, now());")
    fun insertCreat(@Param("user") user: User): Int

    @Select("select * from user where phone = #{phone};")
    fun findUserByPhone(@Param("phone") phone: BigInteger): User

}